package com.zhaoyizhe.demo.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Order(2)
@Slf4j
//@Component
@Aspect
public class MyAspect1 {
    @Before(" com.zhaoyizhe.demo.aspect.TimeRecordAspect.pointcut() ")
    public void doBefore(JoinPoint joinPoint) {
        log.info("MyAspect1.doBefore");

    }

    @After(" com.zhaoyizhe.demo.aspect.TimeRecordAspect.pointcut() ")
    public void doAfter() {
        log.info("MyAspect1.doAfter");
    }
}
